package com.bill99.codecheck.sonar.orm.dao.impl;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.bill99.codecheck.sonar.orm.dao.SonarDataDao;
import com.bill99.riaframework.common.dto.SonarSeriousProblemDto;
import com.bill99.seashell.orm.ibatis.QueryDaoSupport;

public class SonarDataDaoImpl extends QueryDaoSupport implements SonarDataDao {

	public Map<String, BigDecimal> getSonarContentByProjectKey(String projectKey) {

		return getSqlMapClientTemplate().queryForMap("Sonar.getSonarContentByProjectKey", projectKey, "name", "value");
	}

	public Long getIdByName(String projectKey) {

		return queryForObject("Sonar.getProjectIdByName", projectKey);
	}

	public List<SonarSeriousProblemDto> getSonarSeriousProblemByProjectKey(String projectKey) {

		return queryForList("Sonar.getSonarSeriousProblemByProjectKey", projectKey);
	}

}
